package com.hdax.dm.api.scheduler;

import com.hdax.dm.entity.scheduler.Scheduler;
import com.hdax.dm.entity.scheduler.SchedulerSeat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "剧场座位模块")
public interface SchedulerSeatControllerApi {

    @PostMapping(path = "/getScheduleSeatList")
    @ApiOperation(value = "座位类型价格查询",notes = "座位查询")
    @ApiImplicitParam(required = true,name = "scheduleId")
    List<SchedulerSeat> getScheduleSeatList(@RequestParam("scheduleId") Long scheduleId);

    @PostMapping(path = "/updateSeat")
    @ApiOperation(value = "修改座位状态",notes = "座位查询")
    boolean updateSeatStatus(@RequestBody SchedulerSeat schedulerSeat);

    @PostMapping(path = "/getScheduleSeatById")
    @ApiOperation(value = "根据id查询影院信息",notes = "座位查询")
    @ApiImplicitParam(required = true,name = "id")
    Long getScheduleSeatById(@RequestParam("id") Long id);

    @PostMapping(path = "/findSchedulerSeatByOrderNo")
    @ApiOperation(value = "根据订单编号查询座位信息",notes = "座位查询")
    List<SchedulerSeat> findSchedulerSeatByOrderNo(@RequestParam("orderNo") String orderNo);

    @PostMapping(path = "/updateSeatStatusSuccess")
    @ApiOperation(value = "付款成功修改座位状态为已售出",notes = "座位修改")
    boolean updateSeatStatusSuccess(@RequestParam("orderNo") String orderNo,@RequestParam("type") Integer type);

}
